<%@ page import="com.seguim.geroglifics.GeroglificHelper"%>
<%@ page import="java.io.File"%>
<%@ page language="java" contentType="image/png" %><%
	if (request.getParameter("nom") != null) { 
		String carpeta = request.getRequestURI();
		carpeta = carpeta.substring(request.getContextPath().length());
		if (carpeta.indexOf('/') != -1) {
			carpeta = carpeta.substring(0, carpeta.lastIndexOf('/'));
		}
		carpeta += "/imatges";
		String nom = request.getParameter("nom").toLowerCase();
		GeroglificHelper helper = new GeroglificHelper(new File(application.getRealPath(carpeta)), "blanc");
		helper.printImage(nom, "png", response.getOutputStream());
	}
%>